package ute.mvc.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.validation.GroupSequence;
import javax.validation.constraints.Size;
import javax.validation.groups.Default;

import org.hibernate.validator.constraints.NotEmpty;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
public class Subject implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 4073502639231042775L;

	@Id
	@Column(length = 20)
	private String subjectId;

	@Column(length = 100, nullable = false)
	private String subjectName;

	@Column(length = 10000)
	private String description;

	@NotEmpty
	public String getSubjectId() {
		return subjectId;
	}

	public void setSubjectId(String subjectId) {
		this.subjectId = subjectId;
	}
	
	@JsonIgnore
	@OneToMany(mappedBy = "subject")
	private Collection<OpenCourse_Subject> listCourse_Subject = new ArrayList<OpenCourse_Subject>();

	public Collection<OpenCourse_Subject> getListCourse_Subject() {
		return listCourse_Subject;
	}

	public void setListCourse_Subject(Collection<OpenCourse_Subject> listCourse_Subject) {
		this.listCourse_Subject = listCourse_Subject;
	}

	@NotEmpty
	public String getSubjectName() {
		return subjectName;
	}

	public void setSubjectName(String subjectName) {
		this.subjectName = subjectName;
	}

	@NotEmpty
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
